package com.gjy.pd.specification;

import java.util.ArrayList;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-01-17 14:38:24
 */
public class Main {

    public static void main(String[] args) {
        ArrayList<Object> list = new ArrayList<>();
        list.add("a");
        list.add("b");

        ISpecification spec1 = new BizSpecification("a");
        ISpecification spec2 = new BizSpecification("b");

        for (Object o : list) {
            if (spec1.or(spec2).isSatisfiedBy(o)) {
                System.out.println(o);
            }
        }
    }
}
